<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <!-- import CSS -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <style>
        .el-header, .el-footer {
            background-color: #B3C0D1;
            color: #333;
            text-align: center;
            line-height: 60px;
        }

        .el-aside {
            background-color: #D3DCE6;
            color: #333;
            text-align: center;
            line-height: 200px;
        }

        .el-main {
            background-color: #E9EEF3;
            color: #333;
            text-align: center;
            line-height: 160px;
        }

        body > .el-container {
            margin-bottom: 40px;
        }

        .el-container:nth-child(5) .el-aside,
        .el-container:nth-child(6) .el-aside {
            line-height: 260px;
        }

        .el-container:nth-child(7) .el-aside {
            line-height: 320px;
        }
    </style>
</head>
<body>
<div id="app">
    <el-container>
        <el-header>Header</el-header>
        <el-container>
            <el-aside width="200px">Aside</el-aside>
            <el-main>
                <button @click="view">显示</button><button @click="hidden">隐藏</button>
                <hr>
                <div id="msg" v-if="visible">{{message}}</div>
                <div><input type="text" v-model="message"></div>
                <hr>
                打印message：<button @click="print">打印</button>
            </el-main>
        </el-container>
        <el-footer>Footer</el-footer>
    </el-container>
</el-dialog>
</div>
</body>
<!-- import Vue before Element -->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<!-- import JavaScript -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script>
    //jquery $("#msg").html("zhangsna");
   var vue = new Vue({
        el: '#app',
        //业务数据
        data: function() {
            return {
                visible: true,
                message:"hello word"
            }
        },
        methods:{
            view : function () {
                this.visible=true;
            },
            hidden: function () {
                this.visible=false;
            },
            print: function () {
                console.log(this.message);
            }
        }
    })
</script>
</html>
